package io.github.veigara.tcp.device;

import io.github.veigara.tcp.device.factory.charger.ChargingPileComponentFactory;
import io.github.veigara.tcp.framework.factory.DeviceComponentFactoryRegistry;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 设备接入框架配置:注册设备工厂
 */
@Configuration
public class DeviceFrameworkConfig {

    @Bean
    public DeviceComponentFactoryRegistry factoryRegistry() {
        DeviceComponentFactoryRegistry registry = new DeviceComponentFactoryRegistry();
        // 充电机设备工厂
        registry.registerFactory(new ChargingPileComponentFactory());
        return registry;
    }
}